package com.bayern.muchen.blog.service.management.impl;

import com.bayern.muchen.blog.dao.management.UserDao;
import com.bayern.muchen.blog.entity.User;
import com.bayern.muchen.blog.service.management.UserService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;


import java.util.Date;

/**
 * @author QIUYANG
 * @title: UserServiceImpl
 * @description: 用户管理
 * @date 2021/11/3016:07
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserDao userDao;

    /**
     * 新增用户
     *
     * @param user
     * @return
     */
    @Override
    public int insertUser(User user) {
        //TODO 密码加密存数据库
        user.setGmtCreate(new Date());
        return userDao.insertUser(user);
    }
}
